<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2022-04-26
  Time: 9:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h3>javaWEB4个请求范围</h3>

    <%
        pageContext.setAttribute("msg", "pageContext");
        request.setAttribute("msg", "request");
        session.setAttribute("msg", "session");
        application.setAttribute("msg", "application");
    %>

    在四个范围中去取值(同一个页面)：
    <br>
    pageContext:<%=pageContext.getAttribute("msg")%>
    <br>
    request:<%=request.getAttribute("msg")%>
    <br>
    session:<%=session.getAttribute("msg")%>
    <br>
    application:<%=application.getAttribute("msg")%>

    <%
        request.getRequestDispatcher("sameRequest.jsp").forward(request,response);
    %>


</body>
</html>
